package com.whfc.openapi.api.fim.controller;

import com.whfc.openapi.api.fim.service.FimAlgResultService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/10/23 17:00
 */
@RestController
@RequestMapping("open/api/v1/fim")
public class FimPutResultController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private FimAlgResultService fimAlgResultService;

    @PostMapping(value = "/anon/yushi/receiveData")
    public String receiveYuShiData(@RequestBody String body) {
        logger.info("=========宇视算法盒子报警数据===========");
        fimAlgResultService.receiveYuShiData(body);
        return "ok";
    }

    @PostMapping(value = "/anon/kunyun/receiveData")
    public String receiveKunyunData(@RequestBody String body) {
        logger.info("++++++++++鲲云算法盒子数据上报++++++++");
        fimAlgResultService.receiveKunyunData(body);
        return "ok";
    }
}
